package com.example.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.model.Dog;
import com.example.demo.model.req.DogAddRequest;
import com.example.demo.service.DogService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;

@RestController
@RequestMapping("/rabbit")
@Tag(name = "rabbit 兔子")
public class RabbitController {

    @Resource
    private DogService dogService;

    @Operation(summary = "保存")
    @ApiOperationSupport(author = "梅孝亮", order = 502)
    @PostMapping("/save")
    public Dog save(@RequestBody DogAddRequest dogAddRequest) {
        System.out.println("dogAddRequest: " + dogAddRequest);
        Dog dog = new Dog();
        return dog;
    }

    @Operation(summary = "详情")
    @ApiOperationSupport(author = "梅孝亮", order = 501)
    @GetMapping("/get")
    public String get(Integer id) {
        System.out.println("dog get id: " + id);
        return "";
    }

}
